import instance from "./request.js";


interface ILogin{
    account:string,
    password:string
}

interface IZhi{
    price:number,
subject:string

}
export const getLogin=(data:ILogin)=>{
    return instance.post('/login',data)
}

export const getList=(data:any)=>{
    return instance.get('/article/list',data)
}

export const getDetail=(id:number)=>{
    return instance.get(`/article/${id}`)
}

export const getPing=(data:any)=>{
    return instance.post('discuss',data)
}

export const getZhi=(data:IZhi)=>{
    return instance.post('/order/create',data)
}